﻿<Window x:Class="MyFinanceManager.PC.Window1"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  Title="Window1" Height="791.617" Width="1365.543" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" 
    xmlns:MyFinanceManager_Objects="clr-namespace:MyFinanceManager.Objects;assembly=MyFinanceManager.PC.Objects"
    xmlns:int="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
    xmlns:c="clr-namespace:MyFinanceManager.PC" WindowState="Maximized" Closing="Window_Closing">
    <Window.Resources>
        <DataTemplate x:Key="PostingRecordTemplate">
            <Grid Width="190">
                <Rectangle Fill="{DynamicResource LabelBrush}" Stroke="DarkGray" StrokeThickness="1" RadiusX="2" RadiusY="2"/>
                <StackPanel Margin="3,3,3,3">
                    <WrapPanel>
                        <TextBlock Text="{Binding Path=Time.DayOfWeek, Mode=OneWay}" Foreground="White"/>
  				  <TextBlock Text=" " Foreground="White"/>
  				  <TextBlock Text="{Binding Path=Time.Day, Mode=OneWay}" Foreground="White"/>
  				  <TextBlock Text="." Foreground="White"/>
  				  <TextBlock Text="{Binding Path=Time.Month, Mode=OneWay}" Foreground="White"/>
  				  <TextBlock Text="." Foreground="White"/>
  				  <TextBlock Text="{Binding Path=Time.Year, Mode=OneWay}" Foreground="White"/>
  				  <TextBlock Text=" " Foreground="White"/>
  				  <TextBlock Text="{Binding Path=Time.Hour, Mode=OneWay}" Foreground="White"/>
  				  <TextBlock Text=":" Foreground="White"/>
  				  <TextBlock Text="{Binding Path=Time.Minute, Mode=OneWay}" Foreground="White"/>
  			  </WrapPanel>
                    <TextBlock Text="{Binding Path=Amount, StringFormat=C}" Foreground="White"/>
  			  <!--<TextBlock Text="{Binding Path=CategoryName}" Foreground="White"/>-->
       </StackPanel>
            </Grid>
        </DataTemplate>
    </Window.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="200"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <TabControl x:Name="outlookControl" Grid.Column="0" Template="{StaticResource OutlookTab}" SelectionChanged="TabControl_SelectionChanged" Margin="0,0,0,0">
            <TabItem Header="Ausgaben" IsSelected="True">
                <ListBox x:Name="expenses" ItemTemplate="{DynamicResource PostingRecordTemplate}" ItemsSource="{Binding Path=Expenses, Mode=Default}" d:LayoutOverrides="VerticalAlignment" Grid.Column="1" Background="{DynamicResource LabelBrush}" SelectionChanged="Expenses_SelectionChanged"/>
            </TabItem>
            <TabItem Header="Einnahmen">
                <ListBox x:Name="earnings" ItemTemplate="{DynamicResource PostingRecordTemplate}" ItemsSource="{Binding Path=Earnings, Mode=Default}" d:LayoutOverrides="VerticalAlignment" Grid.Column="1" Background="{DynamicResource LabelBrush}" SelectionChanged="Earnings_SelectionChanged"/>
            </TabItem>
            <TabItem Header="Übersicht">
                <StackPanel Background="{DynamicResource LabelBrush}" >
                    <Button Content="Einnahmenüberschussrechnung" IsEnabled="False" />
                    <Button Content="Ausgabenanalyse" IsEnabled="False" />
                    <Button Content="nach Kategorien kumuliert" Click="btCat_Click" />
                    <Button Content="nach Konten kumuliert" IsEnabled="False" />
                    <Button Content="nach Zeit kumuliert" IsEnabled="False" />
                    <Button IsEnabled="False" />
                    <Button IsEnabled="False" />
                    <Button IsEnabled="False" />
                </StackPanel>
            </TabItem>
        </TabControl>
        <c:ucViewPostingRecord x:Name="postingRecordViewer" Grid.Column="1" Visibility="Hidden" />
        <c:ucViewCategoriesGraph x:Name="graphViewer" Grid.Column="1" Visibility="Hidden"/>
        <c:ucViewCategoriesTree x:Name="catViewer" Grid.Column="1" Visibility="Hidden" />
        <c:ucStartpage x:Name="startpage" Grid.Column="1" />
    </Grid>
</Window>
